import request from '@/utils/request'
export function fetchList(params) {
  return request({
    url: '/crm/orderForm/list',
    method: 'get',
    params: params
  })
}
// export function getfetchList(data,type) {
//   return request({
//     url: '/crm/orderForm/list?dateType='+type,
//     method: 'get',
//     data: data
//   })
// }
export function closeOrder(params) {
  return request({
    url: '/order/update/close',
    method: 'post',
    params: params
  })
}

export function deleteOrder(params) {
  return request({
    url: '/order/delete',
    method: 'post',
    params: params
  })
}
export function refundOrder(params) {

  return request({
    url: '/crm/orderForm/refund',
    method: 'post',
    params: params
  })
}

export function deliveryOrder(params) {
  console.log(params, 222222222222222222)
  return request({
    url: '/crm/orderForm/sendOut',
    method: 'post',
    params: params
  });
}

export function getOrderDetail(id) {
  return request({
    url: '/crm/orderForm/getOrderDetail/?id=' + id,
    method: 'get',
    id: id
  });
}



export function updateReceiverInfo(data) {
  return request({
    url: '/order/update/receiverInfo',
    method: 'post',
    data: data
  });
}

export function updateMoneyInfo(data) {
  return request({
    url: '/order/update/moneyInfo',
    method: 'post',
    data: data
  });
}

export function updateOrderNote(params) {
  return request({
    url: '/order/update/note',
    method: 'post',
    params: params
  })
}
